package com.study4.mybatis.springbootstudy4mybatis.mapper;

import com.study4.mybatis.springbootstudy4mybatis.model.CarrierCode;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author xuly
 * @title: CarrierCodeMapper
 * @projectName spring-boot
 * @description: TODO
 * @date 2019-07-2411:30
 **/
public interface CarrierCodeMapper {
    @Select("SELECT * FROM carrier_code WHERE id = #{id}")
    @Results({
            @Result(property = "id",  column = "id"),
            @Result(property = "carrierCode",  column = "carrier_code"),
            @Result(property = "cnName",  column = "cn_name"),
            @Result(property = "kuaidiCode",  column = "kuaidi_code"),
            @Result(property = "yzCode",  column = "yz_code"),
            @Result(property = "edbName",  column = "edb_name"),
            @Result(property = "logoUrl", column = "logo_url")
    })
    CarrierCode getById(Integer id);
}
